<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/common.jsp"%>
<!DOCTYPE html>
<html lang="zh">
<meta charset="utf-8">
<head></head>
<body class="gray-bg">

	<div class="container-div">
		<div class="row">
			<!-- 	<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul> 
							<li>
								类型：<input type="text" name="laLedgerType"/>
							</li> 

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div> -->

			<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
				<!-- 	<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:ledgerArticle:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:ledgerArticle:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:ledgerArticle:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:ledgerArticle:export">
						<i class="fa fa-download"></i> 导出
				 </a> -->
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
	<script th:inline="javascript">
		var prefix = "${ctx}/system/article";
	
		$(function() {
			var options = {
				url : prefix + "/list",
				createUrl : prefix + "/add",
				updateUrl : prefix + "/edit/{id}",
				removeUrl : prefix + "/remove",
				exportUrl : prefix + "/export",
				modalName : "账薄归档",
				search : false,
				showExport : true,
				showColumns : false,
				showToggle : false,
				columns : [ {
					checkbox : true
				},
					{
						field : 'laId',
						title : '编号',
						visible : false
					},
					{
						field : 'laLedgerType',
						title : '类型',
						formatter : function(value, row, index) {
							if (row.laLedgerType == 1) {
								return "总账";
							} else if (row.laLedgerType == 2) {
								return "日记账";
							} else if (row.laLedgerType == 3) {
								return "明细账";
							} 
						}
					},
					{
						field : 'laLedgerTaxpayerName',
						title : '纳税人 '
					},
					{
						field : 'laLedgerPath',
						title : '存储位置',
					} ]
			};
			$.table.init(options);
		});
	</script>
</body>
</html>